# C:\test\huhu.xls

import pandas as pd
import numpy as np
import matplotlib.pyplot as plt

plt.figure(dpi=70)
plt.rcParams['font.sans-serif'] = ['SimHei']  # 用来正常显示中文标签
plt.rcParams['axes.unicode_minus'] = False  # 用来正常显示负号

df = pd.read_excel(r'C:\Users\30348\Desktop\操作系统\Huhu_OS\huhu.xls')
consumer = df.columns.values
consumercount = consumer.size
print(consumercount)
print(consumer)
x = np.linspace(0, 30, 30)

n = 0  # 第n列
markers=['^', 's', 'd', 'x', '8']
for i in consumer:
    plt.scatter(x, df.iloc[:, n], label=i,marker=markers[n])
    #绘制每个点的纵坐标值
    # plt.text(n,int(df.iloc[i].values),10)
    # print(df.iloc[:, n].values)
    # print(df.iloc[:, n].values[0])
    # for k in range(0,30):
    #     plt.annotate("{:.0f}".format(df.iloc[:, n].values[k]), xy=(k, df.iloc[:, n].values[k]),
    #                  xytext=(k,df.iloc[:, n].values[k]+1))
    #     k=k+1
    n = n + 1

plt.xlabel('times')
plt.ylabel('Sum_Of_Consumer')
plt.legend()
plt.show()
